import { useLocation } from 'react-router-dom';
import { decode64 } from '~/core/core';

export function useQuery(): string {
  const { search } = useLocation();
  if (search) {
    const urlPar = new URLSearchParams(search)
    const data = urlPar.get("data")
    if (data) {
        return decode64(data)
    }
  }
    return search
}

